3.18 \(\int (a+b \tan ^{-1}(c x))^2 \, dx\)

Optimal. Leaf size=83 \[ \frac{i b^2 \text{PolyLog}\left (2,1-\frac{2}{1+i c x}\right )}{c}+x \left (a+b \tan ^{-1}(c x)\right )^2+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{c}+\frac{2 b \log \left (\frac{2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{c} \]

[Out]

(I*(a + b*ArcTan[c*x])^2)/c + x*(a + b*ArcTan[c*x])^2 + (2*b*(a + b*ArcTan[c*x])*Log[2/(1 + I*c*x)])/c + (I*b^
2*PolyLog[2, 1 - 2/(1 + I*c*x)])/c

________________________________________________________________________________________

Rubi [A]  time = 0.0978475, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {4846, 4920, 4854, 2402, 2315} \[ \frac{i b^2 \text{PolyLog}\left (2,1-\frac{2}{1+i c x}\right )}{c}+x \left (a+b \tan ^{-1}(c x)\right )^2+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{c}+\frac{2 b \log \left (\frac{2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{c} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])^2,x]

[Out]

(I*(a + b*ArcTan[c*x])^2)/c + x*(a + b*ArcTan[c*x])^2 + (2*b*(a + b*ArcTan[c*x])*Log[2/(1 + I*c*x)])/c + (I*b^
2*PolyLog[2, 1 - 2/(1 + I*c*x)])/c

Rule 4846

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x])^p, x] - Dist[b*c*p, Int[
(x*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 4920

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> -Simp[(I*(a + b*ArcTan
[c*x])^(p + 1))/(b*e*(p + 1)), x] - Dist[1/(c*d), Int[(a + b*ArcTan[c*x])^p/(I - c*x), x], x] /; FreeQ[{a, b,
c, d, e}, x] && EqQ[e, c^2*d] && IGtQ[p, 0]

Rule 4854

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTan[c*x])^p*Lo
g[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTan[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 + c^2*x^
2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \left (a+b \tan ^{-1}(c x)\right )^2 \, dx &=x \left (a+b \tan ^{-1}(c x)\right )^2-(2 b c) \int \frac{x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx\\ &=\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{c}+x \left (a+b \tan ^{-1}(c x)\right )^2+(2 b) \int \frac{a+b \tan ^{-1}(c x)}{i-c x} \, dx\\ &=\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{c}+x \left (a+b \tan ^{-1}(c x)\right )^2+\frac{2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1+i c x}\right )}{c}-\left (2 b^2\right ) \int \frac{\log \left (\frac{2}{1+i c x}\right )}{1+c^2 x^2} \, dx\\ &=\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{c}+x \left (a+b \tan ^{-1}(c x)\right )^2+\frac{2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1+i c x}\right )}{c}+\frac{\left (2 i b^2\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1+i c x}\right )}{c}\\ &=\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{c}+x \left (a+b \tan ^{-1}(c x)\right )^2+\frac{2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1+i c x}\right )}{c}+\frac{i b^2 \text{Li}_2\left (1-\frac{2}{1+i c x}\right )}{c}\\ \end{align*}

Mathematica [A]  time = 0.0755589, size = 90, normalized size = 1.08 \[ \frac{-i b^2 \text{PolyLog}\left (2,-e^{2 i \tan ^{-1}(c x)}\right )+a \left (a c x-b \log \left (c^2 x^2+1\right )\right )+2 b \tan ^{-1}(c x) \left (a c x+b \log \left (1+e^{2 i \tan ^{-1}(c x)}\right )\right )+b^2 (c x-i) \tan ^{-1}(c x)^2}{c} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcTan[c*x])^2,x]

[Out]

(b^2*(-I + c*x)*ArcTan[c*x]^2 + 2*b*ArcTan[c*x]*(a*c*x + b*Log[1 + E^((2*I)*ArcTan[c*x])]) + a*(a*c*x - b*Log[
1 + c^2*x^2]) - I*b^2*PolyLog[2, -E^((2*I)*ArcTan[c*x])])/c

________________________________________________________________________________________

Maple [A]  time = 0.071, size = 128, normalized size = 1.5 \begin{align*} x{b}^{2} \left ( \arctan \left ( cx \right ) \right ) ^{2}-{\frac{i \left ( \arctan \left ( cx \right ) \right ) ^{2}{b}^{2}}{c}}+2\,xab\arctan \left ( cx \right ) +2\,{\frac{\arctan \left ( cx \right ){b}^{2}}{c}\ln \left ({\frac{ \left ( 1+icx \right ) ^{2}}{{c}^{2}{x}^{2}+1}}+1 \right ) }-{\frac{i{b}^{2}}{c}{\it polylog} \left ( 2,-{\frac{ \left ( 1+icx \right ) ^{2}}{{c}^{2}{x}^{2}+1}} \right ) }+{a}^{2}x-{\frac{ab\ln \left ({c}^{2}{x}^{2}+1 \right ) }{c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))^2,x)

[Out]

x*b^2*arctan(c*x)^2-I/c*arctan(c*x)^2*b^2+2*x*a*b*arctan(c*x)+2/c*arctan(c*x)*ln((1+I*c*x)^2/(c^2*x^2+1)+1)*b^
2-I/c*polylog(2,-(1+I*c*x)^2/(c^2*x^2+1))*b^2+a^2*x-1/c*a*b*ln(c^2*x^2+1)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{16} \,{\left (4 \, x \arctan \left (c x\right )^{2} + 192 \, c^{2} \int \frac{x^{2} \arctan \left (c x\right )^{2}}{16 \,{\left (c^{2} x^{2} + 1\right )}}\,{d x} + 16 \, c^{2} \int \frac{x^{2} \log \left (c^{2} x^{2} + 1\right )^{2}}{16 \,{\left (c^{2} x^{2} + 1\right )}}\,{d x} + 64 \, c^{2} \int \frac{x^{2} \log \left (c^{2} x^{2} + 1\right )}{16 \,{\left (c^{2} x^{2} + 1\right )}}\,{d x} - x \log \left (c^{2} x^{2} + 1\right )^{2} + \frac{4 \, \arctan \left (c x\right )^{3}}{c} - 128 \, c \int \frac{x \arctan \left (c x\right )}{16 \,{\left (c^{2} x^{2} + 1\right )}}\,{d x} + 16 \, \int \frac{\log \left (c^{2} x^{2} + 1\right )^{2}}{16 \,{\left (c^{2} x^{2} + 1\right )}}\,{d x}\right )} b^{2} + a^{2} x + \frac{{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} a b}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2,x, algorithm="maxima")

[Out]

1/16*(4*x*arctan(c*x)^2 + 192*c^2*integrate(1/16*x^2*arctan(c*x)^2/(c^2*x^2 + 1), x) + 16*c^2*integrate(1/16*x
^2*log(c^2*x^2 + 1)^2/(c^2*x^2 + 1), x) + 64*c^2*integrate(1/16*x^2*log(c^2*x^2 + 1)/(c^2*x^2 + 1), x) - x*log
(c^2*x^2 + 1)^2 + 4*arctan(c*x)^3/c - 128*c*integrate(1/16*x*arctan(c*x)/(c^2*x^2 + 1), x) + 16*integrate(1/16
*log(c^2*x^2 + 1)^2/(c^2*x^2 + 1), x))*b^2 + a^2*x + (2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*a*b/c

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} \arctan \left (c x\right )^{2} + 2 \, a b \arctan \left (c x\right ) + a^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2,x, algorithm="fricas")

[Out]

integral(b^2*arctan(c*x)^2 + 2*a*b*arctan(c*x) + a^2, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \operatorname{atan}{\left (c x \right )}\right )^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))**2,x)

[Out]

Integral((a + b*atan(c*x))**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \arctan \left (c x\right ) + a\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2,x, algorithm="giac")

[Out]

integrate((b*arctan(c*x) + a)^2, x)